<script>
    $(document).ready(function(){
        $('.close-btn').click(function () {
            parent.$('.right-iframe').fadeOut(100);
            parent.$('.topnav').addClass('topnav-inverse');
            if(parent.sideStatu ==0){
                parent.$('.pside-toggle').click();
            }
        });

        $('a[data-type="delete-custom-contact"]').click(function () {
            var $tr = $(this).parent().parent();
            alertify.confirm("确定操作？", function (e) {
                if (e) {
                    var url = "/custom/index/deleteContact";
                    var data = "id=" + $tr.attr('data-valueid');
                    $.ajax({
                        type: "GET",
                        url: url,
                        data: data,
                        success: function (data) {
                            if (data == "0") {
                                alertify.alert("操作成功!", function () {
                                    location.reload();
                                });

                            } else {
                                alertify.alert("操作失败!");
                            }
                        }
                    });
                }
            });
        });
    });
</script>